|
Radar Host Communication library
2020.08.13
|
This struct holds all information about a single frame of radar data. More...
#include <radar_common.h>
Data Fields | |
| const float * | sample_data |
| uint32_t | frame_number |
| uint32_t | num_chirps |
| uint8_t | num_rx_antennas |
| uint32_t | num_samples_per_chirp |
| uint8_t | rx_mask |
| uint8_t | adc_resolution |
| uint8_t | interleaved_rx |
| Rx_Data_Format_t | data_format |
This struct holds all information about a single frame of radar data.
A structure of this type is returned through the callback Callback_Data_Frame_t when ep_radar_base_get_frame_data is called.
The data type of samples in sample_data depends on the ADC resolution. If adc_resolution <= 8, sample_data points to an array of uint8_t. If 8 < adc_resolution <= 16, sample_data points to an array of uint16_t. Higher ADC resolutions are currently not supported.
If the frame contains more than one chirp, the chirps are stored in consecutive data blocks. The start of each chirp can be calculated by the following formula.
The index calculation of a certain data sample captured from a certain RX antenna depends on the data interleaving and on real/complex data format. The following code examples demonstrate how to access a data sample.
In the code examples above, ANTENNA_NUMBER does not refer to the physical antenna number, but the n-th enabled antenna. If for example rx_mask = 0xA, ANTENNA_NUMBER=0 refers to antenna 0010b and ANTENNA_NUMBER=1 refers to antenna 1000b. Furthermore it is assumed that pDataBuffer and frame_start are casted to (uint8_t*) or (uint16_t*) according to ADC resolution.
In total the data buffer contains num_chirps * num_rx_antennas * num_samples_per_chirp values. If radar data is complex, that value is multiplied by 2.
Definition at line 160 of file radar_common.h.
| uint8_t adc_resolution |
The ADC resolution of the data in sample_data.
Definition at line 187 of file radar_common.h.
| Rx_Data_Format_t data_format |
This indicates if the data is sample_data is real or complex, and if complex data is interleaved.
Definition at line 203 of file radar_common.h.
| uint32_t frame_number |
The running number of the data frame. The frame counter is, reset every time ep_radar_base_set_automatic_frame_trigger is called. If automatic frame trigger is not active, the frame counter may not work, and this could be 0.
Definition at line 164 of file radar_common.h.
| uint8_t interleaved_rx |
If this is 0, the radar data of multiple RX antennas is stored in consecutive data blocks, where each block holds data of one antenna. If this is non-zero, the radar data of multiple RX antennas is stored in one data block, where for each point in time the samples from all RX antennas are stored consecutively before the data of the next point in time follows.
Definition at line 189 of file radar_common.h.
| uint32_t num_chirps |
The number of chirps in this frame.
Definition at line 173 of file radar_common.h.
| uint8_t num_rx_antennas |
The number of RX signals that have been acquired with each chirp.
Definition at line 175 of file radar_common.h.
| uint32_t num_samples_per_chirp |
The number of samples acquired in each chirp for each enabled RX antenna.
Definition at line 178 of file radar_common.h.
| uint8_t rx_mask |
Each antenna is represented by a bit in this mask. If the bit is set, the according RX antenna was used to capture data in this frame.
Definition at line 181 of file radar_common.h.
| const float* sample_data |
The buffer containing the radar data
Definition at line 162 of file radar_common.h.